package cn.enilu.flash.bean.entity.pro;

import cn.enilu.flash.bean.entity.BaseEntity;
import cn.enilu.flash.bean.entity.system.Dept;
import lombok.Data;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * Created  on 2018/4/2 0002.
 *
 * @author enilu
 */
@Entity(name = "t_company")
@Table(appliesTo = "t_company", comment = "物业公司")
@Data
@EntityListeners(AuditingEntityListener.class)
public class Company extends BaseEntity {
    @Column(columnDefinition = "VARCHAR(32) COMMENT '编号'", unique = true, nullable = false)
    @NotBlank(message = "编号不能为空")
    private String code;
    @Column(columnDefinition = "VARCHAR(64) COMMENT '名称'", nullable = false)
    @NotBlank(message = "名称不能为空")
    private String name;
    @Column(columnDefinition = "VARCHAR(32) COMMENT '图标'")
    private String icon;
    @Column(columnDefinition = "VARCHAR(32) COMMENT '地址'")
    private String address;


}
